<script setup>
import { useRouter } from 'vue-router';
import { ref } from 'vue'
const router = useRouter()
let page = ref('')
function show() { 
  router.push(page.value)
}
function goMyPage() {
  show()
}


</script>

<template>
  <div>
    <button @click="goMyPage()">Go</button><input type="text" v-model="page" placeholder="You can input home,list,add and update" class="text">
    <router-view></router-view>
  </div>

</template>

<style scoped>
  .text{
    width: 300px;
  }
</style>
